<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 1.将vue.js引入 -->
    <script src="./js/vue.js"></script>
</head>

<body>
    <div class="app">
        <button v-on:click="add2(100,$event)">按钮+100</button>

    </div>

    <script>
        const vm = new Vue({
            el: '.app',
            data: {
                msg: 123,
                num: 10
            },
            methods: {
                add2(param, event) {
                    console.log(param);

                    const tagcount = event.target.innerHTML.substring(event.target.innerHTML.indexOf('+') + 1)
                    var res = event.target.innerHTML
                    console.log(tagcount);

                    console.log(param + (tagcount - 0));

                }
            }
        })
    </script>
</body>

</html>